package frsf.cidisi.exercise.tpidemia.search;

import frsf.cidisi.faia.agent.Action;
import frsf.cidisi.faia.agent.Perception;
import frsf.cidisi.faia.environment.Environment;

public class Emiroce extends Environment {

    public Emiroce() {
        // Create the environment state
        this.environmentState = new ArqueologoEstadoEntorno();
    }

    public ArqueologoEstadoEntorno getEnvironmentState() {
        return (ArqueologoEstadoEntorno) super.getEnvironmentState();
    }

    /**
     * This method is called by the simulator. Given the Agent, it creates
     * a new perception reading, for example, the agent position.
     * @param agent
     * @return A perception that will be given to the agent by the simulator.
     */
    
    public  ArqueologoPerception getPercept() {
        // Create a new perception to return
         this.getEnvironmentState().ejecutarPirata();
         ArqueologoPerception perception = new ArqueologoPerception();
		 ArqueologoEstadoEntorno estadoEntorno = this.getEnvironmentState();
		//TODO : Set the perceptions sensors
		 perception.setCamara(estadoEntorno.getTesoro(estadoEntorno.getarqueologoPosicion()));
		 perception.setSatelite(estadoEntorno.getTesoro());
		 perception.setGps(estadoEntorno.getarqueologoPosicion());
                 perception.setPirata(estadoEntorno.getPosicionPirata());
		 
		 
		 
        
        // Return the perception
        return perception;
    }

    
    public String toString() {
        return environmentState.toString();
    }

    
    public boolean agentFailed(Action actionReturned) {

        ArqueologoEstadoEntorno envState =
                this.getEnvironmentState();

        // TODO: Complete Method        

        return false;
    }

	//TODO: Complete this section with agent-specific methods
    // The following methods are agent-specific:
    
    
}
